package com.thread.AtomicIntegerDemo;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author milian
 * @Date 2021/8/8 0008 11:36
 */
public class MyRunnable implements Runnable{
    AtomicInteger count= new AtomicInteger(0);
    @Override
    public void run() {
        for (int j=0;j<100;j++) {
            int i = count.incrementAndGet();
            System.out.println(i);
        }
    }
}
